using Cinemachine;
using UnityEngine;

public class ConfinerDetector : MonoBehaviour
{
    private void OnTriggerEnter2D(Collider2D collision)
    {
        PolygonCollider2D m_collider = collision.GetComponent<PolygonCollider2D>();
        if (m_collider != null)
        {
            Camera.main.GetComponentInChildren<CinemachineConfiner2D>().m_BoundingShape2D = m_collider;
        }
    }

}